import Taro, { Component } from '@tarojs/taro'
import { View, Button, Text } from '@tarojs/components'
import { observer, inject } from '@tarojs/mobx'
import { AtTabs, AtTabsPane, AtIcon } from 'taro-ui'
import {PI} from '../../tool/number'
import * as tool from '../../tool/utils'
import './receiveGoods.scss'


@inject('counterStore')
@observer
class ReceiveGoods extends Component {

    config = {
        navigationBarTitleText: '收货管理',
        navigationBarTextStyle: 'black',
        navigationBarBackgroundColor: '#FFF',
    }
    constructor() {
        super(...arguments)
        this.state = {
            current: 0,
        }
    }
    handleChange = (value) => {
        this.setState({
            value
        })
    }
    componentWillMount() {
        console.log('componentWillMount----');
        console.log(tool.title,tool.name,PI);
    }

    componentWillReact() {
        console.log('componentWillReact')
    }

    componentDidMount() { }

    componentWillUnmount() { }

    componentDidShow() { }
    handleClick(value) {
        this.setState({
            current: value
        })
    }
    componentDidHide() { }
    render() {
        const { counterStore: { counter } } = this.props
        const { icon } = this.state;
        const tabList = [{ title: '全部' }, { title: '待收货' }, { title: '已收货' }]
        return (
            <View className='receiveGoods-page'>
                <AtTabs current={this.state.current} tabList={tabList} onClick={this.handleClick.bind(this)}>
                    <AtTabsPane current={this.state.current} index={0} >
                        <View className="table">
                            <View className="title">
                                <View>配货单号：2020392183921212</View>
                                <View style={{ color: '#1791FF' }}>待收货<AtIcon prefixClass='icon' value='gengduo' size='10' color='#1791FF'></AtIcon></View></View>
                            <View className="cell">
                                <View className="header">
                                    <label>供应商</label>
                                    <label>箱数</label>
                                    <label>总金额</label>
                                </View>
                                <View className="body">
                                    <label>广州光明果蔬贸易有限公司</label>
                                    <label>10</label>
                                    <label>50000</label>
                                </View>
                            </View>
                        </View>

                        <View className="table">
                            <View className="title">
                                <View>配货单号：2020392183921212</View>
                                <View style={{ color: '#1791FF' }}>待收货<AtIcon prefixClass='icon' value='gengduo' size='10' color='#1791FF'></AtIcon></View></View>
                            <View className="cell">
                                <View className="header">
                                    <label>供应商</label>
                                    <label>箱数</label>
                                    <label>总金额</label>
                                </View>
                                <View className="body">
                                    <label>广州光明果蔬贸易有限公司</label>
                                    <label>10</label>
                                    <label>50000</label>
                                </View>
                            </View>
                        </View>

                        <View className="table">
                            <View className="title">
                                <View>配货单号：2020392183921212</View>
                                <View style={{ color: '#1791FF' }}>待收货<AtIcon prefixClass='icon' value='gengduo' size='10' color='#1791FF'></AtIcon></View></View>
                            <View className="cell">
                                <View className="header">
                                    <label>供应商</label>
                                    <label>箱数</label>
                                    <label>总金额</label>
                                </View>
                                <View className="body">
                                    <label>广州光明果蔬贸易有限公司</label>
                                    <label>10</label>
                                    <label>50000</label>
                                </View>
                            </View>
                        </View>
                        <View className="table">
                            <View className="title">
                                <View>配货单号：2020392183921212</View>
                                <View style={{ color: '#1791FF' }}>待收货<AtIcon prefixClass='icon' value='gengduo' size='10' color='#1791FF'></AtIcon></View></View>
                            <View className="cell">
                                <View className="header">
                                    <label>供应商</label>
                                    <label>箱数</label>
                                    <label>总金额</label>
                                </View>
                                <View className="body">
                                    <label>广州光明果蔬贸易有限公司</label>
                                    <label>10</label>
                                    <label>50000</label>
                                </View>
                            </View>
                        </View>
                    </AtTabsPane>
                    <AtTabsPane current={this.state.current} index={1}>
                        <View className="table">
                            <View className="title">
                                <View>配货单号：2020392183921212</View>
                                <View style={{ color: '#1791FF' }}>待收货<AtIcon prefixClass='icon' value='gengduo' size='10' color='#1791FF'></AtIcon></View></View>
                            <View className="cell">
                                <View className="header">
                                    <label>供应商</label>
                                    <label>箱数</label>
                                    <label>总金额</label>
                                </View>
                                <View className="body">
                                    <label>广州光明果蔬贸易有限公司</label>
                                    <label>10</label>
                                    <label>50000</label>
                                </View>
                            </View>
                        </View>

                        <View className="table">
                            <View className="title">
                                <View>配货单号：2020392183921212</View>
                                <View style={{ color: '#1791FF' }}>待收货<AtIcon prefixClass='icon' value='gengduo' size='10' color='#1791FF'></AtIcon></View></View>
                            <View className="cell">
                                <View className="header">
                                    <label>供应商</label>
                                    <label>箱数</label>
                                    <label>总金额</label>
                                </View>
                                <View className="body">
                                    <label>广州光明果蔬贸易有限公司</label>
                                    <label>10</label>
                                    <label>50000</label>
                                </View>
                            </View>
                        </View>

                        <View className="table">
                            <View className="title">
                                <View>配货单号：2020392183921212</View>
                                <View style={{ color: '#1791FF' }}>待收货<AtIcon prefixClass='icon' value='gengduo' size='10' color='#1791FF'></AtIcon></View></View>
                            <View className="cell">
                                <View className="header">
                                    <label>供应商</label>
                                    <label>箱数</label>
                                    <label>总金额</label>
                                </View>
                                <View className="body">
                                    <label>广州光明果蔬贸易有限公司</label>
                                    <label>10</label>
                                    <label>50000</label>
                                </View>
                            </View>
                        </View>

                        <View className="table">
                            <View className="title">
                                <View>配货单号：2020392183921212</View>
                                <View style={{ color: '#1791FF' }}>待收货<AtIcon prefixClass='icon' value='gengduo' size='10' color='#1791FF'></AtIcon></View></View>
                            <View className="cell">
                                <View className="header">
                                    <label>供应商</label>
                                    <label>箱数</label>
                                    <label>总金额</label>
                                </View>
                                <View className="body">
                                    <label>广州光明果蔬贸易有限公司</label>
                                    <label>10</label>
                                    <label>50000</label>
                                </View>
                            </View>
                        </View>
                    </AtTabsPane>
                    <AtTabsPane current={this.state.current} index={2}>
                        <View className="table">
                            <View className="title">
                                <View>配货单号：2020392183921212</View>
                                <View style={{ color: '#1791FF' }}>已收货<AtIcon prefixClass='icon' value='gengduo' size='10' color='#1791FF'></AtIcon></View></View>
                            <View className="cell">
                                <View className="header">
                                    <label>供应商</label>
                                    <label>箱数</label>
                                    <label>总金额</label>
                                </View>
                                <View className="body">
                                    <label>广州光明果蔬贸易有限公司</label>
                                    <label>10</label>
                                    <label>50000</label>
                                </View>
                            </View>
                        </View>

                        <View className="table">
                            <View className="title">
                                <View>配货单号：2020392183921212</View>
                                <View style={{ color: '#1791FF' }}>已收货<AtIcon prefixClass='icon' value='gengduo' size='10' color='#1791FF'></AtIcon></View></View>
                            <View className="cell">
                                <View className="header">
                                    <label>供应商</label>
                                    <label>箱数</label>
                                    <label>总金额</label>
                                </View>
                                <View className="body">
                                    <label>广州光明果蔬贸易有限公司</label>
                                    <label>10</label>
                                    <label>50000</label>
                                </View>
                            </View>
                        </View>

                        <View className="table">
                            <View className="title">
                                <View>配货单号：2020392183921212</View>
                                <View style={{ color: '#1791FF' }}>已收货<AtIcon prefixClass='icon' value='gengduo' size='10' color='#1791FF'></AtIcon></View></View>
                            <View className="cell">
                                <View className="header">
                                    <label>供应商</label>
                                    <label>箱数</label>
                                    <label>总金额</label>
                                </View>
                                <View className="body">
                                    <label>广州光明果蔬贸易有限公司</label>
                                    <label>10</label>
                                    <label>50000</label>
                                </View>
                            </View>
                        </View>

                        <View className="table">
                            <View className="title">
                                <View>配货单号：2020392183921212</View>
                                <View style={{ color: '#1791FF' }}>已收货<AtIcon prefixClass='icon' value='gengduo' size='10' color='#1791FF'></AtIcon></View></View>
                            <View className="cell">
                                <View className="header">
                                    <label>供应商</label>
                                    <label>箱数</label>
                                    <label>总金额</label>
                                </View>
                                <View className="body">
                                    <label>广州光明果蔬贸易有限公司</label>
                                    <label>10</label>
                                    <label>50000</label>
                                </View>
                            </View>
                        </View>
                    </AtTabsPane>
                </AtTabs>

            </View>
        )
    }
}

export default ReceiveGoods
